package lab02.test06;

/**
 * Created by 婷婷 on 2017/10/15.
 */
public class Test06 {

    public static void main(String[] args) {

        //三角形
        Triangle triangle = new Triangle();
        triangle.setSide(3, 4, 5);

        //使用if条件调用判断三角形成立的方法，当三条边能够构成三角形时，再调用打印三角形的周长和面积
        if (triangle.isTriangle()) {
            System.out.println("三角形周长：" + triangle.circumference());
            System.out.println("三角形面积：" + triangle.area());
        }

        //梯形
        Ladder ladder = new Ladder(2, 4, 5);
        System.out.println("---------------------------");
        System.out.println("梯形面积：" + ladder.area());

        //圆
        Circle circle = new Circle(40);
        System.out.println("---------------------------");
        System.out.println("圆面积：" + circle.area());
        System.out.println("圆周长：" + circle.circumference());
    }

}
